package org.rambadger.command.command;

import org.axonframework.commandhandling.annotation.TargetAggregateIdentifier;
import org.hibernate.validator.constraints.NotEmpty;
import org.rambadger.command.validation.UrlIdentifier;

import javax.validation.constraints.NotNull;

public class ChangeUserPassword {
    @TargetAggregateIdentifier
    private final String username;
    private final String newPasswordHash;

    public ChangeUserPassword(String username, String newPasswordHash) {
        this.username = username;
        this.newPasswordHash = newPasswordHash;
    }

    @UrlIdentifier @NotNull
    public String getUsername() {
        return username;
    }

    @NotEmpty
    public String getNewPasswordHash() {
        return newPasswordHash;
    }
}
